<template>
  <div>
    <ksh-layout>
      <template #left>
        <echart-main>
          <template #title>疫情防控</template>
          <template #echart>
            <div class="yqfk">
              <ul class="yqfk-tj">
                <li v-for="item in yq">
                  <span>{{ item.name }}</span
                  >:<span>{{ item.value }}</span>
                </li>
              </ul>
              <div class="fx">
                <div class="fx-ts">低</div>
                <div class="fx-dz">
                  <p>承德市围场县山湾子乡红葫芦村</p>
                  <p>2022-01-19 12:55:44</p>
                </div>
              </div>
              <div class="tels">
                <div>110</div>
                <div>119</div>
                <div>120</div>
              </div>
              <div class="videos-yq">
                <div class="video-yq">
                  <img
                    src="~assets/img/iot/video-play.png"
                    alt=""
                    class="video-play"
                  />
                  <p>村南</p>
                </div>
                <div class="video-yq">
                  <img
                    src="~assets/img/iot/video-play.png"
                    alt=""
                    class="video-play"
                  />
                  <p>村北</p>
                </div>
              </div>
            </div>
          </template>
        </echart-main>
        <echart-main class="echart">
          <template #title>今日进出人次</template>
          <template #echart>
            <echart :options="option1" />
          </template>
        </echart-main>
        <echart-main class="echart">
          <template #title>今日进出车次</template>
          <template #echart>
            <echart :options="option1" />
          </template>
        </echart-main>
      </template>
      <template #right>
        <echart-main>
          <template #title>方向控制</template>
          <template #echart>
            <div class="imgskz">
              <img src="~assets/img/iot/img2.png" alt="" />
            </div>
          </template>
        </echart-main>
      </template>
    </ksh-layout>
    <div class="video-center">
      <div class="video-c">
        <img src="~assets/img/iot/video-play.png" alt="" class="video-play" />
        <p><img src="~assets/img/iot/video-bot.jpg" alt="" /></p>
      </div>
      <div class="video-c">
        <img src="~assets/img/iot/video-play.png" alt="" class="video-play" />
        <p><img src="~assets/img/iot/video-bot.jpg" alt="" /></p>
      </div>
      <div class="video-c">
        <img src="~assets/img/iot/video-play.png" alt="" class="video-play" />
        <p><img src="~assets/img/iot/video-bot.jpg" alt="" /></p>
      </div>
      <div class="video-c">
        <img src="~assets/img/iot/video-play.png" alt="" class="video-play" />
        <p><img src="~assets/img/iot/video-bot.jpg" alt="" /></p>
      </div>
    </div>
  </div>
</template>

<script>
import Echart from "components/common/echart/Echart.vue";
import EchartMain from "components/content/echartMain/EchartMain.vue";
import KshLayout from "components/content/layoutMain/KshLayout.vue";

import { echart1 } from "./echart/option";
export default {
  components: { KshLayout, EchartMain, Echart },
  data() {
    return {
      option1: null,
      option2: null,
      yq: [
        {
          name: "总户数",
          value: "597",
        },
        {
          name: "总人口",
          value: "1570",
        },
        {
          name: "隔离户数",
          value: "0",
        },
        {
          name: "发热人员",
          value: "0",
        },
        {
          name: "秘结者",
          value: "0",
        },
        {
          name: "确诊者",
          value: "0",
        },
      ],
    };
  },
  created() {
    this.option1 = echart1();
    this.option2 = echart1();
  },

  mounted() {},

  methods: {},
};
</script>

<style lang="scss" scoped>
.echart {
  height: 12.5rem;
}
.yqfk {
  .yqfk-tj {
    display: flex;
    flex-wrap: wrap;
    li {
      line-height: 2.5rem;
      padding-left: 2.1875rem;
      background: url(~assets/img/iot/yq-bg.png) no-repeat;
      background-size: 100% 100%;
      flex: 0 0 48%;
      margin: 1%;
      span:nth-child(1) {
        font-size: 0.875rem;
        display: inline-block;
      }
      span:nth-child(2) {
        font-size: 1.5rem;
        font-family: "shuzi";
        color: #00f0ff;
        margin-left: 0.3125rem;
      }
    }
  }
  .fx {
    display: flex;
    align-items: center;
    padding: 0.3125rem 0.625rem;
    background-color: rgba(13, 66, 116, 0.8);
    margin: 0.625rem 1% 0;
    .fx-ts {
      width: 2.9375rem;
      height: 2.9375rem;
      background: url(~assets/img/iot/yq-img.png) no-repeat;
      background-size: 100% 100%;
      text-align: center;
      line-height: 2.9375rem;
      font-size: 1.25rem;
    }
    .fx-dz {
      margin-left: 1.875rem;
      p:nth-child(1) {
        font-size: 1rem;
      }
      p:nth-child(2) {
        font-size: 0.75rem;
        color: #00f0ff;
      }
    }
  }
  .tels {
    display: flex;
    margin: 0.625rem 1% 0;
    justify-content: space-between;
    div {
      width: 6.75rem;
      height: 2.375rem;
      text-align: center;
      line-height: 2.5rem;
      padding-left: 1.75rem;
    }
    div:nth-child(1) {
      background: url(~assets/img/iot/yq-tel1.png) no-repeat;
      background-size: 100% 100%;
    }
    div:nth-child(2) {
      background: url(~assets/img/iot/yq-tel2.png) no-repeat;
      background-size: 100% 100%;
    }
    div:nth-child(3) {
      background: url(~assets/img/iot/yq-tel3.png) no-repeat;
      background-size: 100% 100%;
    }
  }
  .videos-yq {
    display: flex;
    margin-top: 0.625rem;
    .video-yq {
      flex: 1;
      background-color: #182742;
      border: 0.0625rem solid #123958;
      border-radius: 0.1875rem;
      margin: 0 1%;
      position: relative;
      height: 6.25rem;
      .video-play {
        position: absolute;
        left: 50%;
        top: 45%;
        transform: translate(-50%, -50%);
        width: 1.875rem;
      }
      p {
        position: absolute;
        bottom: 0;
        background-color: #0e1728;
        width: 100%;
        text-align: center;
        font-size: 0.875rem;
      }
    }
  }
}
.imgskz {
  width: 100%;
  height: 100%;
  overflow: auto;
  padding: 0.625rem;
  img {
    width: 100%;
  }
}
.video-center {
  position: absolute;
  top: 5rem;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 53.125rem);
  height: calc(100% - 6.25rem);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  align-items: center;
  .video-c {
    flex: 0 0 45%;
    background-color: #182742;
    position: relative;
    height: 45%;
    .video-play {
      width: 6.25rem;
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
    }
    p {
      position: absolute;
      bottom: 0;
      width: 100%;
      img {
        width: 100%;
      }
    }
  }
}
</style>